package com.example.book.controller;

import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * advice 统一异常测试类
 */
@RequestMapping("/text")
@RestController
public class TextController {
    @RequestMapping(value = "/t1",produces = "application/json")
    public String t1() {
        return "t1";
    }

    @RequestMapping("/t2")
    public boolean t2() {
        int a = 10/0;
        return true;
    }
    @RequestMapping("/t3")
    public boolean t3() {
        String str = null;
        System.out.println(str.length());
        return true;
    }
}
